#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	FILE* pf1 = fopen("data.txt", "r");
	FILE* pf2 = fopen("data_copy.txt", "w");
	int ch = 0;
	while (ch = fgetc(pf1) != EOF)
	{
		fputc(ch, pf2);
	}
	int ch2 = 0;
	while (ch2 = fgetc(pf2) != EOF)
	{
		printf("%c ", ch2);
	}
	fclose(pf1);
	pf1 = NULL;
	fclose(pf2);
	pf2 = NULL;
	return 0;
}